package com.winit.psc.model;

import org.springframework.data.annotation.Transient;
import org.springframework.data.cassandra.mapping.Column;
import org.springframework.data.cassandra.mapping.PrimaryKey;
import org.springframework.data.cassandra.mapping.Table;

import java.util.List;

/**
 * Created by wangjian on 2017/11/22.
 */
@Table(value = "matrix_psc")
public class MatrixPsc {
    @PrimaryKey
    @Column(value = "id")
    private String id;
    @Column(value = "name")
    private String name;
    @Column(value = "code")
    private String code;
    @Column(value = "childs")
    private List<String> childs;
    @Column(value = "parent_id")
    private String parentId;
    @Column(value = "status")
    private String status;
    @Column(value = "type")
    private String type;
    @Column(value = "path")
    private String path;

    /**
     * 前台树形结构列表用children判断子节点列表
     */
    @Transient
    private List<MatrixPsc> children;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public List<String> getChilds() {
        return childs;
    }

    public void setChilds(List<String> childs) {
        this.childs = childs;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public List<MatrixPsc> getChildren() {
        return children;
    }

    public void setChildren(List<MatrixPsc> children) {
        this.children = children;
    }

}
